import 'package:flutter/cupertino.dart';
import '../../util/http.dart';

class CallMaterialApi{

  BuildContext? context;

  static CallMaterialApi of(BuildContext? context){
    CallMaterialApi materialRequest = CallMaterialApi();
    materialRequest.context = context;
    return materialRequest;
  }

  /// 查找拣配单列表
  Future<dynamic> picks(String code) async{
    return await ApiService.of(context).get('lgs/call/material/picks/'+code);
  }

  /// 清单查看
  Future<dynamic> detail(String code, String container) async{
    return await ApiService.of(context).get('lgs/call/material/detail/' + code +'/'+ container);
  }

  /// 创建配送单
  Future<dynamic> createDelivery(data) async{
    return await ApiService.of(context).post("lgs/call/material/createDelivery", data);
  }

}